package com.woniuxy03;

import java.util.Arrays;

/**
 * @author 作者
 * @create 2025-11-03 16:34
 */
public class Test02 {
    public static void main(String[] args) {
        Student[] students=new Student[3];
        students[0]=new Student(1,"zs",11);
        students[1]=new Student(2,"ls",15);
        students[2]=new Student(3,"ww",13);
        //遍历数组,普通for
//        for(int i=0;i<students.length;i++){
//            Student student = students[i];
//            System.out.println(student);
//        }
        //遍历数组,增强for
//        for( Student student : students){
//            System.out.println(student);
//        }

        System.out.println(Arrays.toString(students));
    }
}
